<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script>
    class Student {
      constructor(name, number) {
        this.name = name;
        this.number = number;
      }
      sayHi() {
        console.log(
          `姓名${this.name},学号${this.number}`
        )
      }
    }

    const xialuo = new Student('谢罗', 100);
    console.log(xialuo.name);
    xialuo.sayHi();
</script>
</html>
